let token = sessionStorage.getItem("token");

$(function () {
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg); //匹配目标参数
        if (r != null) return unescape(r[2]);
        return null; //返回参数值
    }
    //接收URL中的参数id
    let motion_id = getUrlParam('motion_id');
    let user_id = getUrlParam('user_id');
    $.ajax({
        url:testurl + "motion/reply_detail",
        type:"post",
        headers: { "Authorization": "Bearer " + token},
        contentType: "application/json",
        data:JSON.stringify({
            "motion_id":motion_id,//议案id
            "user_id":user_id//办理单位id
        }),
        success:function (data) {
            
            $(".mainContent").html(data.obj.reply_content);
            $(".reply_date").html(data.obj.reply_date);
            $("title").html("查看" + data.obj.organ_name+ "的答复意见 " + data.obj.reply_date+" ");
            $(".reply_type_name").html(data.obj.reply_type_name);
            $(".reply_file_name").html(data.obj.reply_file_name);
            $(".reply_file_name").attr("href", testurl + data.obj.reply_file_name);
        }
    })
    //499 935
});